import request from '@/utils/axios/index'
import type { Dayjs } from 'dayjs'

/** 拓展目标_终端客户_上传图片信息 */
export interface ExpandTargetCustomerPicture {
  id: number // ID
  expandTargetCustomerId: number // 拓展终端客户ID
  type: string // 图片类型
  url: string // 图片地址
}

// 拓展目标_终端客户_上传图片 API
export const ExpandTargetCustomerPictureApi = {
  // 查询拓展目标_终端客户_上传图片分页
  getExpandTargetCustomerPicturePage: async (params: any) => {
    return await request.get({ url: `/san/biz-expand-target-customer-picture/page`, params })
  },

  // 查询拓展目标_终端客户_上传图片详情
  getExpandTargetCustomerPicture: async (id: number) => {
    return await request.get({ url: `/san/biz-expand-target-customer-picture/get?id=` + id })
  },

  // 新增拓展目标_终端客户_上传图片
  createExpandTargetCustomerPicture: async (data: ExpandTargetCustomerPicture) => {
    return await request.post({ url: `/san/biz-expand-target-customer-picture/create`, data })
  },

  // 修改拓展目标_终端客户_上传图片
  updateExpandTargetCustomerPicture: async (data: ExpandTargetCustomerPicture) => {
    return await request.put({ url: `/san/biz-expand-target-customer-picture/update`, data })
  },

  // 删除拓展目标_终端客户_上传图片
  deleteExpandTargetCustomerPicture: async (id: number) => {
    return await request.delete({ url: `/san/biz-expand-target-customer-picture/delete?id=` + id })
  },

  /** 批量删除拓展目标_终端客户_上传图片 */
  deleteExpandTargetCustomerPictureList: async (ids: number[]) => {
    return await request.delete({
      url: `/san/biz-expand-target-customer-picture/delete-list?ids=${ids.join(',')}`
    })
  },

  // 导出拓展目标_终端客户_上传图片 Excel
  exportExpandTargetCustomerPicture: async (params) => {
    return await request.download({
      url: `/san/biz-expand-target-customer-picture/export-excel`,
      params
    })
  }
}
